<?php
namespace app\common\validate\Post;

use think\Validate;

// 商品订单的验证器
class Post extends Validate
{
    protected $rule =   [
        'title' => 'require', 
        'content'   => 'require',
        'busid'   => 'require',
        'cateid'   => 'require',
        'point' => ['require', 'number', '>=:0'],
        'status' => ['number', 'in:0,1'],
    ];

    protected $message  =   [
        'title.require'     => '提问标题必须填写',
        'content.require'     => '提问描述必须填写',
        'busid.require'     => '发布人必须填写',
        'cateid.require'  => '提问分类必须填写',    
        'point.require'   => '悬赏积分必须填写',
        'point.number'      => '悬赏积分必须是数字类型',
        'point.>='      => '悬赏积分必须大于等于0元',
        'status.number'      => '帖子状态的类型有误',
        'status.in'      => '帖子状态的值有误',
    ];

}

?>